const state = {
  userInfo: {
    name: "张三",
    age: 18,
  },
};
const getters = {
    userName: state => state.userInfo.name,
    userAge: state => state.userInfo.age
};
const mutations = {
  GFT_USER: (state, params) => {
    state.userInfo = params;
  },
};
const actions = {
  setUserInfo({ commit }, params) {
    commit("GFT_USER",params)
  },
};

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions,
};
